/*
 * FrameElement.h
 *
 *  Created on: 2010-6-5
 *      Author: guobc
 */

#ifndef FRAMEELEMENT_H_
#define FRAMEELEMENT_H_

#include "CommonElement.h"

namespace HA {
class FrameElement: public HA::CommonElement {
public:
	FrameElement();

	/**
	 * Get the set of names handles by this element.
	 * @return The names to be matched that create elements of this type.
	 */
	inline string* getIds() const {
		return mIds;
	}

	/**
	 * Allow creating an instance of this node.
	 * @return A new instance of this node.
	 */
	inline ASTNode* newInstance() const {
		return new FrameElement();
	}

	/**
	 * Modify the location of frame.
	 * @parem url The new location url.
	 */
	inline void setFrameLocation(const string& url) {
		setAttribute("SRC", url);
	}

	/**
	 * Return the location of frame.
	 * @return The url of location.
	 */
	inline string getFrameLocation() {
		return getAttribute("SRC");
	}

	/**
	 * Return the name attribute value.
	 * @return The value of name attribute.
	 */
	inline string getFrameName() {
		return getAttribute("NAME");
	}

private:
	static string mIds[];
};
}

#endif /* FRAMEELEMENT_H_ */
